#pragma once
#include "base/condition.h"
namespace net_tools{

class Count_down_cond : base::noncopyable{
 public:
  Count_down_cond(int);
  ~Count_down_cond() = default;
  void Set_count(int count);
  void Add_count(int count);
  void Wait();
  void Signal();
 private:
  mutable base::Mutex mutex_;
  base::Condition     cond_;
  int                 count_;
};

} // namespace net_tools